import { setFormAuditReadonly } from "@/components/basic/ViewGrid/ViewGridReadonly.jsx";
export default function (props, currentRow) {
  const dataConfig = {
    currentAction: {
      value: "Update",
    },
    currentRow: {
      value: currentRow,
    },
    defaultFormReadonlyFields: {
      value: props.formOptions.flat().map((x) => {
        return x.readonly || x.disabled;
      }),
    },
  };
  const tableInfo = {
    name: props.tableName,
  };
  return setFormAuditReadonly(
    tableInfo,
    props.formFields,
    props.formOptions,
    dataConfig
  );
}
